{
 "cells": [
  {
   "cell_type": "markdown",
   "source": [
    "# Generating Results on AVisT\n",
    "\n",
    "Please download the results from [here](https://drive.google.com/open?id=1Sacgh5TZVjfpanmwCFvKkpnOA7UHZCY0) and the AVisT dataset from [here](https://sites.google.com/view/avist-benchmark) and adapt the file `pytracking/evaluation/local.py`."
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "%load_ext autoreload\n",
    "%autoreload 2\n",
    "%matplotlib inline\n",
    "import sys\n",
    "import matplotlib.pyplot as plt\n",
    "plt.rcParams['figure.figsize'] = [14, 8]\n",
    "\n",
    "sys.path.append('../..')\n",
    "from pytracking.analysis.plot_results import plot_results, print_results\n",
    "from pytracking.evaluation import get_dataset, trackerlist"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "trackers = []\n",
    "trackers.extend(trackerlist('atom', 'default', range(0, 5), 'ATOM'))\n",
    "trackers.extend(trackerlist('dimp', 'dimp18', range(0,5), 'DiMP18'))\n",
    "trackers.extend(trackerlist('dimp', 'dimp50', range(0, 5), 'DiMP-50'))\n",
    "trackers.extend(trackerlist('dimp', 'prdimp18', range(0, 5), 'PrDiMP-18'))\n",
    "trackers.extend(trackerlist('dimp', 'prdimp50', range(0, 5), 'PrDiMP-50'))\n",
    "trackers.extend(trackerlist('dimp', 'super_dimp', range(0, 5), 'Super DiMP'))\n",
    "trackers.extend(trackerlist('kys', 'default', range(0, 5), 'KYS'))\n",
    "trackers.extend(trackerlist('tomp', 'tomp101', 0, 'ToMP-101'))\n",
    "trackers.extend(trackerlist('tomp', 'tomp50', 0, 'ToMP-50'))\n",
    "trackers.extend(trackerlist('keep_track', 'default_fast', range(0, 5), 'KeepTrack'))\n",
    "trackers.extend(trackerlist('alpha_refine', 'super_dimp_seg_refine_box', range(0, 5), 'AlphaRefine'))\n",
    "trackers.extend(trackerlist('rts', 'rts50', range(0, 5), 'RTS'))\n",
    "trackers.extend(trackerlist('stark_st', 'baseline_R101', None, 'STARK-ST-101'))\n",
    "trackers.extend(trackerlist('stark_st', 'baseline', None, 'STARK-ST-50'))\n",
    "trackers.extend(trackerlist('transt', 'transt50', None, 'TransT'))\n",
    "trackers.extend(trackerlist('mixformer_online', 'baseline', None, 'MixFormer-22k'))\n",
    "trackers.extend(trackerlist('mixformer_online', 'baseline_1k', None, 'MixFormer-1k'))\n",
    "trackers.extend(trackerlist('mixformer_online', 'baseline_large', None, 'MixFormerL-22k'))\n",
    "trackers.extend(trackerlist('trdimp', 'trdimp_lasot', range(3), 'TrDiMP'))\n",
    "trackers.extend(trackerlist('trdimp', 'trsiam', range(3), 'TrSiam'))\n",
    "trackers.extend(trackerlist('siamrpn_pp', 'siamrpn_r50_l234_dwxcorr_otb', None, 'SiamRPN++'))\n",
    "trackers.extend(trackerlist('siammask', 'siammask_r50_l3', None, 'SiamMask'))\n",
    "trackers.extend(trackerlist('siamban', 'siamban_r50_l234_otb', None, 'SiamBAN'))\n",
    "trackers.extend(trackerlist('ocean', 'online', None, 'Ocean'))\n",
    "\n",
    "plot_results(trackers, get_dataset('avist'), 'avist', merge_results=True, force_evaluation=True,\n",
    "             skip_missing_seq=False, exclude_invalid_frames=False, plot_types=('success'))"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "trackers = []\n",
    "trackers.extend(trackerlist('atom', 'default', range(0, 5), 'Atom'))\n",
    "trackers.extend(trackerlist('dimp', 'dimp18', range(0, 5), 'DiMP-18'))\n",
    "trackers.extend(trackerlist('dimp', 'dimp50', range(0, 5), 'DiMP-50'))\n",
    "trackers.extend(trackerlist('dimp', 'prdimp18', range(0, 5), 'PrDiMP-18'))\n",
    "trackers.extend(trackerlist('dimp', 'prdimp50', range(0, 5), 'PrDiMP-50'))\n",
    "trackers.extend(trackerlist('dimp', 'super_dimp', range(0, 5), 'Super DiMP'))\n",
    "trackers.extend(trackerlist('kys', 'default', range(0, 5), 'KYS'))\n",
    "trackers.extend(trackerlist('tomp', 'tomp101', 0, 'ToMP-101'))\n",
    "trackers.extend(trackerlist('tomp', 'tomp50', 0, 'ToMP-50'))\n",
    "trackers.extend(trackerlist('keep_track', 'default_fast', range(0, 5), 'KeepTrack'))\n",
    "trackers.extend(trackerlist('alpha_refine', 'super_dimp_seg_refine_box', range(0, 5), 'ARBoxRefine'))\n",
    "trackers.extend(trackerlist('alpha_refine', 'super_dimp_seg_box_from_seg', range(0, 5), 'ARSegToBox'))\n",
    "trackers.extend(trackerlist('rts', 'rts50', range(0, 5), 'RTS'))\n",
    "trackers.extend(trackerlist('stark_st', 'baseline_R101', None, 'STARK-ST-101'))\n",
    "trackers.extend(trackerlist('stark_st', 'baseline', None, 'STARK-ST-50'))\n",
    "trackers.extend(trackerlist('transt', 'transt50', None, 'TransT'))\n",
    "trackers.extend(trackerlist('mixformer_online', 'baseline', None, 'MixFormer-22k'))\n",
    "trackers.extend(trackerlist('mixformer_online', 'baseline_1k', None, 'MixFormer-1k'))\n",
    "trackers.extend(trackerlist('mixformer_online', 'baseline_large', None, 'MixFormerL-22k'))\n",
    "trackers.extend(trackerlist('trdimp', 'trdimp', range(3), 'TrDiMP'))\n",
    "trackers.extend(trackerlist('trdimp', 'trdimp_lasot', range(3), 'TrDiMP-LaSOT'))\n",
    "trackers.extend(trackerlist('trdimp', 'trsiam', range(3), 'TrSiam'))\n",
    "trackers.extend(trackerlist('trdimp', 'trsiam_lasot', range(3), 'TrSiam-LaSOT'))\n",
    "trackers.extend(trackerlist('siamrpn_pp', 'siamrpn_r50_l234_dwxcorr_otb', None, 'SiamRPN++'))\n",
    "trackers.extend(trackerlist('siammask', 'siammask_r50_l3', None, 'SiamMask'))\n",
    "trackers.extend(trackerlist('siamban', 'siamban_r50_l234_otb', None, 'SiamBAN'))\n",
    "trackers.extend(trackerlist('ocean', 'online', None, 'Ocean'))\n",
    "\n",
    "print_results(trackers, get_dataset('avist'), 'avist', merge_results=True, force_evaluation=True,\n",
    "              skip_missing_seq=False, exclude_invalid_frames=False, plot_types=('success'))"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}